﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Data.Linq.Mapping;
using System.ComponentModel;

namespace NutriLeaf.Phone.Model
{
    [Table]
    public class TipCategory : INotifyPropertyChanged, INotifyPropertyChanging
    {
        private int tipCategoryID, parentCategoryID;
        private string categoryName,categoryDescription;

        [Column(IsPrimaryKey = true)]
        public int TipCategoryID
        {
            get
            {
                return tipCategoryID;
            }
            set
            {
                NotifyPropertyChanging("TipCategoryID");
                tipCategoryID = value;
                NotifyPropertyChanged("TipCategoryID");
            }

        }


        [Column]
        public string CategoryName
        {
            get
            {
                return categoryName;
            }
            set
            {
                NotifyPropertyChanging("CategoryName");
                categoryName = value;
                NotifyPropertyChanged("CategoryName");
            }

        }

        [Column]
        public string CategoryDescription
        {
            get
            {
                return categoryDescription;
            }
            set
            {
                NotifyPropertyChanging("CategoryDescription");
                categoryDescription = value;
                NotifyPropertyChanged("CategoryDescription");
            }

        }

        [Column]
        public int ParentCategoryID
        {
            get
            {
                return parentCategoryID;
            }
            set
            {
                NotifyPropertyChanging("ParentCategoryID");
                parentCategoryID = value;
                NotifyPropertyChanged("ParentCategoryID");
            }

        }

        




        public event PropertyChangedEventHandler PropertyChanged;

        public event PropertyChangingEventHandler PropertyChanging;

        private void NotifyPropertyChanged(string propertyName) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } }
        private void NotifyPropertyChanging(string propertyName) { if (PropertyChanging != null) { PropertyChanging(this, new PropertyChangingEventArgs(propertyName)); } }
    }
}
